<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html:xhtml />
<script type="text/javascript">
    function asthmaPValues() {
        <bean:write name="makePathwayForm" property="asthmaJS" filter="false"/>
    }

    function atopyPValues() {
        <bean:write name="makePathwayForm" property="atopyJS" filter="false"/>
    }

    function ahrPValues() {
        <bean:write name="makePathwayForm" property="ahrJS" filter="false"/>
    }

    function atopicAsthmaPValues() {
        <bean:write name="makePathwayForm" property="atopicAsthmaJS" filter="false"/>
    }

    $(function() {
        document.medusa.layoutGraph();
        asthmaPValues();
    });
</script>
<div id="customPathway" class="content pathway">
    <h2>Custom Pathway</h2>
    <div id="pathwayScore">Nyholt Pathway Score: </div>
    <div id="sidacPathwayScore">Sidac Pathway Score: </div>
    <div class="leftMenu">
        <p><bean:message key="pathway.gene" />:</p>
        <html:errors property="genes" />
        <html:form action="customPathwaySubmit">
            <div>
                <html:select property="geneNames" multiple="multiple" size="8">
                    <html:optionsCollection name="makePathwayForm" property="geneList" value="gene.name" label="gene.name" />
                </html:select>
                <html:hidden value="true" property="chkGene" />
                <html:hidden value="custom" property="source" />
                <html:submit value="SNP List" property="submitType" />
                <html:submit value="Associations" property="submitType" />
                <html:submit value="Gene Gene Interaction" property="submitType" />
                <logic:present name="user_name">
                    <html:submit value="SNP Ratio Test" property="submitType" />
                </logic:present>
            </div>
        </html:form>
    </div>
    <div class="rightChart">
        <div>
            <input type="radio" name="group" id="asthma" value="Asthma" checked="checked" onclick="asthmaPValues()" />
            <label for="asthma">Asthma</label>
            <input type="radio" name="group" id="atopy" value="Atopy" onclick="atopyPValues()" />
            <label for="atopy">Atopy</label>
            <input type="radio" name="group" id="ahr" value="AHR" onclick="ahrPValues()" />
            <label for="ahr">AHR</label>
            <input type="radio" name="group" id="atoAsthma" value="Atopic Asthma" onclick="atopicAsthmaPValues()" />
            <label for="atoAsthma">Atopic Asthma</label>
        </div>
        <div id="medusa">
            <applet code="medusa.applet.MedusaLite.class" archive="<html:rewrite page="/Medusa_1_5_13.jar" />" height="400" width="550" name="medusa" id="medusa">
                <param name="edges" value="<bean:write name="makePathwayForm" property="edgeText"/>" />
                <param name="nodes" value="<bean:write name="makePathwayForm" property="nodeText"/>" />
                <param name="X"value="250" />
                <param name="Y" value="500" />
                <param name="layout" value="true" />
            </applet>
        </div>
    </div>
</div>
<div id="pvalueModal" title="Association"></div>